import Vue from 'vue'
import Router from 'vue-router'

//首页
import Homepage from '@/views/Homepage.vue'
import MainPage from "@/views/MainPage.vue"

//登录
import Login from "@/views/login/login.vue"
import forget from "@/views/login/Forget.vue"
import register from "@/views/login/register.vue"
import verify from "@/views/login/verify.vue"
import CorrectingChild from "@/components/LearningCenter/CourseCenter/CorrectingChild.vue"

//学生端
import CourseCenter1 from "@/views/CourseCenter/CourseCenter.vue"
import CourseCentermain from "@/views/CourseCenter/CourseCentermain.vue"
import Coursecatalogue from "@/views/CourseCenter/Coursecatalogue/Coursecatalogue.vue"
import VideoLearning from "@/views/CourseCenter/Coursecatalogue/VideoLearning/VideoLearning.vue"
import CourseListstu from "@/views/CourseCenter/CourseList.vue"
import chapterstu from "@/views/CourseCenter/Coursecatalogue/chapterstu/chapterstu.vue"
import workstu from "@/views/CourseCenter/Coursecatalogue/workstu/workstu.vue"
import Viewjobstu from "@/views/CourseCenter/Coursecatalogue/workstu/Viewjobstu.vue"
import Editjobstu from "@/views/CourseCenter/Coursecatalogue/workstu/Editjobstu.vue"
import teststu from "@/views/CourseCenter/Coursecatalogue/teststu/teststu.vue"
import meanstu from "@/views/CourseCenter/Coursecatalogue/meanstu/meanstu.vue"
import LearningRecords from "@/views/CourseCenter/Coursecatalogue/LearningRecords.vue"
//老师端
//作业
import work from "@/components/LearningCenter/CourseCenter/work.vue"
import chapter from "@/components/LearningCenter/CourseCenter/chapter/chapter.vue"
import SchoolManagement from "@/components/LearningCenter/CourseCenter/SchoolManagement/SchoolManagement.vue"
import ProfessionalManagement from "@/components/LearningCenter/CourseCenter/SchoolManagement/ProfessionalManagement.vue"
import CollegeManagement from "@/components/LearningCenter/CourseCenter/SchoolManagement/CollegeManagement.vue"
import count from "@/components/LearningCenter/CourseCenter/count.vue"
import means from "@/components/LearningCenter/CourseCenter/means.vue"
import test from "@/components/LearningCenter/CourseCenter/test.vue"
import Invigilate from "@/components/LearningCenter/CourseCenter/test/Invigilate.vue"
import Portrait from "@/components/LearningCenter/CourseCenter/test/InvigilateComent/Portrait.vue"
import correcting from "@/components/LearningCenter/CourseCenter/correcting.vue"
import JobLibrary from "@/components/LearningCenter/CourseCenter/work/JobLibrary.vue"
import Newjob from "@/components/LearningCenter/CourseCenter/work/Newjob.vue"
import database from "@/components/LearningCenter/CourseCenter/work/database.vue"
import Workcorrecting from "@/components/LearningCenter/CourseCenter/work/Workcorrecting.vue"
import mycourse from "@/components/LearningCenter/CourseCenter/work/mycourse.vue"
import AutoCreatePaper from "@/components/LearningCenter/CourseCenter/test/AutoCreatePaper.vue"
import Releasejob from "@/components/LearningCenter/CourseCenter/work/Releasejob.vue"
import Homeworkcorrection from "@/components/LearningCenter/CourseCenter/work/Homeworkcorrection.vue"
//专项练习
import SpecialExercises from "@/views/SpecialExercises.vue"
import specialtest from "@/components/specialtest/specialtest.vue"
import Specialanalysis from "@/components/specialtest/Specialanalysis.vue"
//考试记录
import ExamRecords from "@/views/ExamRecords/ExamRecords.vue"
import ExamMain from "@/views/ExamRecords/ExamMain.vue"
import ExamStatistics from "@/views/ExamRecords/ExamStatistics.vue"
import Startexam from "@/views/ExamRecords/Startexam.vue"
import testcenter from "@/views/StudentCenter/testcenter.vue"
import testList from "@/views/StudentCenter/testcenterList/testList.vue"
//错题本
import WrongQuestion from "@/views/StudentCenter/WrongQuestion.vue"
import collection from "@/views/StudentCenter/collection.vue"
//答题记录
import AnswerRecord from "@/components/AnswerRecord/AnswerRecord.vue"
import ExamPractice from "@/components/AnswerRecord/ExamPractice.vue"

//在线考试
import examination from "@/components/examination/examination.vue"

//面经
import FacialMeridian from "@/components/FacialMeridian/FacialMeridian.vue"
import SpecialMeridian from "@/components/FacialMeridian/SpecialMeridian.vue"
import SurfaceDetails from "@/components/FacialMeridian/SurfaceDetails.vue"
import ReleaseProfile from "@/components/FacialMeridian/ReleaseProfile.vue"

//创建试卷
import CreateTest from "@/components/CreateTest/CreateTest.vue"



//个人中心
import PersonalCenter from "@/views/PersonalCenter/PersonalCenter.vue"
import BrushQuestions from "@/views/PersonalCenter/Subject/BrushQuestions.vue"
import WrongQuestionBook from "@/views/PersonalCenter/Subject/WrongQuestionBook.vue"
import Messagecenter from "@/views/PersonalCenter/Messagecenter.vue"
import MyPosts from "@/views/PersonalCenter/MyPosts/MyPosts.vue"
import Collectposts from "@/views/PersonalCenter/MyPosts/Collectposts.vue"
import Receivetopic from "@/views/PersonalCenter/Subject/Receivetopic.vue"
import LearningRecord from "@/views/PersonalCenter/LearningRecord.vue"
import collectionType from "@/views/StudentCenter/testcenterList/collectionType.vue"
import Person from "@/views/PersonalCenter/Person/Person.vue"
import Bindingschool from "@/views/PersonalCenter/Person/Bindingschool.vue"
import record from "@/views/PersonalCenter/record.vue"
//学习中心老师端
import LearningCenter from "@/components/LearningCenter/LearningCenter.vue"
import BankManagement from "@/components/LearningCenter/CourseCenter/HomeCenter/BankManagement.vue"
import Examanagement from "@/components/LearningCenter/CourseCenter/HomeCenter/Examanagement.vue"
import paperManagement from "@/components/LearningCenter/CourseCenter/HomeCenter/paperManagement.vue"
import SingleCom from "@/components/Questions/SingleCom.vue"
import MultipleCom from "@/components/Questions/MultipleCom.vue"
import JudgeCom from "@/components/Questions/JudgeCom.vue"
import BriefanswerCom from "@/components/Questions/BriefanswerCom.vue"
import BlanksCom from "@/components/Questions/BlanksCom.vue"
//资料库
import Home from "@/components/LearningCenter/Home.vue"
//班级列表
import ClassList from "@/components/LearningCenter/ClassList.vue"
//课程列表 创建课程
import CourseList from "@/components/LearningCenter/CourseList.vue"
import CreatCourse from "@/components/LearningCenter/CourseList/CreatCourse.vue"
//题库
import QuestionBank from "@/components/LearningCenter/QuestionBank.vue"
//课程中心
import CourseCenter from "@/components/LearningCenter/CourseCenter/CourseCenter.vue"
import chapterTest from "@/components/LearningCenter/CourseCenter/chapter/chapter/chapterTest.vue"

//管理
import Administration from "@/components/LearningCenter/CourseCenter/Administration/Administration.vue"

//试卷
import CreatTest from "@/components/LearningCenter/CourseCenter/test/CreatTest.vue"
import testStatistics from "@/components/LearningCenter/CourseCenter/test/testStatistics.vue"
import ExaminationStatistics from "@/components/LearningCenter/CourseCenter/test/ExaminationStatistics.vue"
import ReleaseTest from "@/components/LearningCenter/CourseCenter/test/ReleaseTest.vue"
import Viewtest from "@/components/LearningCenter/CourseCenter/test/Viewtest/Viewtest.vue" 
import Viewjob from "@/components/LearningCenter/CourseCenter/work/Viewjob/Viewjob.vue" 
//试卷库
import Testpaper from "@/components/LearningCenter/CourseCenter/test/Testpaper.vue"

//班级管理
import ClassManagement from "@/components/LearningCenter/CourseCenter/ClassManagement/ClassManagement.vue"

//自己写的测试题页面
import Mytest from "../views/testquestion/Mytest.vue"
import exerciseTest from "../views/testquestion/exerciseTest.vue"
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)
export default new Router({
	routes: [{
		path: '/',
		name: 'Homepage',
		component: Homepage,
		redirect: "/MainPage",
		children: [

			{
				path: '/MainPage',
				name: 'MainPage',
				component: MainPage,
			},
			{
				path: '/SpecialExercises',
				name: 'SpecialExercises',
				component: SpecialExercises,

			},
			{
				path: '/ExamRecords',
				name: 'ExamRecords',
				component: ExamRecords,
			},
			{
				path: '/WrongQuestion',
				name: 'WrongQuestion',
				component: WrongQuestion,
			},
			{
				path: '/FacialMeridian',
				name: 'FacialMeridian',
				component: FacialMeridian,
			},
			{
				path: '/SurfaceDetails',
				name: 'SurfaceDetails',
				component: SurfaceDetails,
			},
			{
				path: '/ReleaseProfile',
				name: 'ReleaseProfile',
				component: ReleaseProfile,
			},
			{
				path: '/collectionType',
				name: 'collectionType',
				component: collectionType,

			},
			{
				path: '/record',
				name: 'record',
				component: record,
			},
			{
				path: '/PersonalCenter',
				name: 'PersonalCenter',
				component: PersonalCenter,
				children: [{
					path: '/',
					redirect: '/Messagecenter'
					},
					{
						path: '/BrushQuestions',
						name: 'BrushQuestions',
						component: BrushQuestions,
					},
					{
						path: '/Messagecenter',
						name: 'Messagecenter',
						component: Messagecenter,

					},
					{
						path: '/MyPosts',
						name: 'MyPosts',
						component: MyPosts,

					},
					{
						path: '/Collectposts',
						name: 'Collectposts',
						component: Collectposts,

					},
					{
						path: '/Receivetopic',
						name: 'Receivetopic',
						component: Receivetopic,
					},
					{
						path: '/WrongQuestionBook',
						name: 'WrongQuestionBook',
						component: WrongQuestionBook,

					}, {
						path: '/LearningRecord',
						name: 'LearningRecord',
						component: LearningRecord,

					}, {
						path: '/Person',
						name: 'Person',
						component: Person,

					},
					{
						path: '/Bindingschool',
						name: 'Bindingschool',
						component: Bindingschool,
					}
				]
			}, {
				path: '/testcenter',
				name: 'testcenter',
				component: testcenter,

			},
			{
				path: '/testList',
				name: 'testList',
				component: testList,
			},
			{
				path: '/collection',
				name: 'collection',
				component: collection,

			},
			{
				path: '/CourseCentermain',
				name: 'CourseCentermain',
				component: CourseCentermain,
			},
			{
				path: '/specialtest',
				name: 'specialtest',
				component: specialtest,

			},
			{
				path: '/Specialanalysis',
				name: 'Specialanalysis',
				component: Specialanalysis,
			}
		]
	},
	{
		path: '/Login',
		name: 'Login',
		component: Login,
	}, {
		path: '/forget',
		name: 'forget',
		component: forget,
	}, {
		path: '/register',
		name: 'register',
		component: register,
	}, {
		path: '/verify',
		name: 'verify',
		component: verify,
	}, {
		path: '/AnswerRecord',
		name: 'AnswerRecord',
		component: AnswerRecord,
	},
	{
		path: '/ExamPractice',
		name: 'ExamPractice',
		component: ExamPractice,

	},
	{
		path: '/examination',
		name: 'examination',
		component: examination,
	}, {
		path: '/CreateTest',
		name: 'CreateTest',
		component: CreateTest,
	}, {
		path: '/ReleaseTest',
		name: 'ReleaseTest',
		component: ReleaseTest,

	},
	{
		path: '/chapterTest',
		name: 'chapterTest',
		component: chapterTest,

	},
	{
		path: '/Releasejob',
		name: 'Releasejob',
		component: Releasejob,

	},
	{
		path: '/LearningCenter',
		name: 'LearningCenter',
		component: LearningCenter,
		children: [{
			path: '/',
			redirect: '/Home'
		},
		{
			path: '/Home',
			name: 'Home',
			component: Home,
		},
		{
			path: '/BankManagement',
			name: 'BankManagement',
			component: BankManagement,
		},
		{
			path: '/CourseList',
			name: 'CourseList',
			component: CourseList,
		},
		{
			path: '/Examanagement',
			name: 'Examanagement',
			component: Examanagement,

		},
		{
			path: '/paperManagement',
			name: 'paperManagement',
			component: paperManagement,

		},
		{
			path: '/SingleCom',
			name: 'SingleCom',
			component: SingleCom,

		},
		{
			path: '/MultipleCom',
			name: 'MultipleCom',
			component: MultipleCom,
		},
		{
			path: '/JudgeCom',
			name: 'JudgeCom',
			component: JudgeCom,
		}, {
			path: '/JudgeCom',
			name: 'JudgeCom',
			component: JudgeCom,
		}, {
			path: '/BriefanswerCom',
			name: 'BriefanswerCom',
			component: BriefanswerCom,
		},
		{
			path: '/BlanksCom',
			name: 'BlanksCom',
			component: BlanksCom,
		}



		]
	},

	{
		path: '/QuestionBank',
		name: 'QuestionBank',
		component: QuestionBank,
	},

	{
		path: '/CourseCenter',
		name: 'CourseCenter',
		component: CourseCenter,
		children: [{
			path: '/',
			redirect: '/chapter'
		},
		{
			path: '/work',
			name: 'work',
			component: work,
		},
		{
			path: '/test',
			name: 'test',
			component: test,
		},
		{
			path: '/count',
			name: 'count',
			component: count,
		},
		{
			path: '/means',
			name: 'means',
			component: means,
		}, {
			path: '/chapter',
			name: 'chapter',
			component: chapter,
		},
		{
			path: '/Home',
			name: 'Home',
			component: Home,
		},
		{
			path: '/ClassList',
			name: 'ClassList',
			component: ClassList,
		},
		{
			path: "/Administration",
			name: "Administration",
			component: Administration
		}, {
			path: "/SchoolManagement",
			name: "SchoolManagement",
			component: SchoolManagement

		},
		{
			path: "/ProfessionalManagement",
			name: "ProfessionalManagement",
			component: ProfessionalManagement

		},
		{
			path: "/CollegeManagement",
			name: "CollegeManagement",
			component: CollegeManagement

		},
		{

			path: "/Invigilate",
			name: "Invigilate",
			component: Invigilate

		}
		]

	},
	{
		path: '/Homeworkcorrection',
		name: 'Homeworkcorrection',
		component: Homeworkcorrection,

	},

	{
		path: '/correcting',
		name: 'correcting',
		component: correcting,

	},
	{
		path: '/Workcorrecting',
		name: 'Workcorrecting',
		component: Workcorrecting,

	},

	{
		path: '/CreatTest',
		name: 'CreatTest',
		component: CreatTest,
	}, {
		path: '/Testpaper',
		name: 'Testpaper',
		component: Testpaper,
	}, {
		path: '/ClassManagement',
		name: 'ClassManagement',
		component: ClassManagement,
	},
	{
		path: "/JobLibrary",
		name: "JobLibrary",
		component: JobLibrary

	},
	{
		path: "/Newjob",
		name: "Newjob",
		component: Newjob

	},
	{
		path: "/database",
		name: "database",
		component: database

	},
	{
		path: "/mycourse",
		name: "mycourse",
		component: mycourse

	},
	{
		path: "/AutoCreatePaper",
		name: "AutoCreatePaper",
		component: AutoCreatePaper

	}, {
		path: '/SpecialMeridian',
		name: 'SpecialMeridian',
		component: SpecialMeridian,
	},
	{
		path: '/testStatistics',
		name: 'testStatistics',
		component: testStatistics,
	}, {
		path: '/ExaminationStatistics',
		name: 'ExaminationStatistics',
		component: ExaminationStatistics,
	},


	{
		path: '/CourseCenter1',
		name: 'CourseCenter1',
		component: CourseCenter1,
		children: [{
			path: '/',
			redirect: '/CourseListstu'
		},
		{
			path: '/CourseListstu',
			name: 'CourseListstu',
			component: CourseListstu,
		},

		]
	},
	{

		path: '/Coursecatalogue',
		name: 'Coursecatalogue',
		component: Coursecatalogue,
		children: [{
			path: '/',
			redirect: '/chapterstu'
		},
		{
			path: '/chapterstu',
			name: 'chapterstu',
			component: chapterstu,

		},
		{
			path: '/workstu',
			name: 'workstu',
			component: workstu,
		},
		{
			path: '/teststu',
			name: 'teststu',
			component: teststu,
		},
		{
			path: '/count',
			name: 'count',
			component: count,
		},
		{
			path: '/meanstu',
			name: 'meanstu',
			component: meanstu,
		}, {
			path: '/chapter',
			name: 'chapter',
			component: chapter,
		},
		{
			path: '/Home',
			name: 'Home',
			component: Home,
		},
		{
			path: '/ClassList',
			name: 'ClassList',
			component: ClassList,
		},
		{
			path: "/Administration",
			name: "Administration",
			component: Administration
		},
		{
			path: "/LearningRecords",
			name: "LearningRecords",
			component: LearningRecords

		},
		{
			path: "/VideoLearning",
			name: "VideoLearning",
			component: VideoLearning

		},

		]

	}, {
		path: '/ExamStatistics',
		name: 'ExamStatistics',
		component: ExamStatistics,
	},
	{
		path: '/ExamMain',
		name: 'ExamMain',
		component: ExamMain,

	},
	{
		path: '/Startexam',
		name: 'Startexam',
		component: Startexam,

	},
	{
		path: '/Viewtest',
		name: 'Viewtest',
		component: Viewtest,
		
	},
	{
		path: '/Viewjob',
		name: 'Viewjob',
		component: Viewjob,
		
	},
	{
		path: '/Viewjobstu',
		name: 'Viewjobstu',
		component: Viewjobstu,
		
	},
	{
		path: '/Portrait',
		name: 'Portrait',
		component: Portrait,
		
	},{
		path: '/CorrectingChild',
		name: 'CorrectingChild',
		component: CorrectingChild,
		
	},
	{
		path: '/Editjobstu',
		name: 'Editjobstu',
		component: Editjobstu,
		
	},
	{
		path: '/Mytest',
		name: 'Mytest',
		component: Mytest,

	},
	{
		path: '/exerciseTest',
		name: 'exerciseTest',
		component: exerciseTest,
	}






	]
})
